import 'package:cook_dinner/pages/signature/signature_view/signature_nav.dart';
import 'package:cook_dinner/pages/signature/signature_view/signature_view.dart';
import 'package:cook_dinner/widgets/custom_appbar.dart';
import 'package:flutter/material.dart';
import 'package:cook_dinner/config/include.dart';

class Signature extends StatefulWidget {
  const Signature({Key? key}) : super(key: key);

  @override
  State<Signature> createState() => _SignatureState();
}

class _SignatureState extends State<Signature> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      extendBodyBehindAppBar: true,
      appBar: AppBarCustom(
        '签到福利',
        back: false,
        size: 28.rpx,
        color: Colors.white,
        bgColor: Colors.transparent,
      ),
      body: Stack(
        children: [
          Image.asset('assets/images/orange.png'),
          ListView(
            padding: EdgeInsets.only(top: 86.rpx),
            children: [
              Padding(
                padding: EdgeInsets.only(right: 98.rpx),
                child: Align(
                  alignment: Alignment.centerRight,
                  child: Text(
                    '积分',
                    style: TextStyle(fontSize: 20.rpx, color: Colors.white),
                  ),
                ),
              ),
              Center(
                child: Text(
                  '4,200',
                  style: TextStyle(fontSize: 36.rpx, color: Colors.white),
                ),
              ),
              SizedBox(height: 24.rpx),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  Text(
                    '领取记录',
                    style: TextStyle(fontSize: 20.rpx, color: Colors.white),
                  ),
                  Text(
                    '我的奖品',
                    style: TextStyle(fontSize: 20.rpx, color: Colors.white),
                  ),
                ],
              ),
              const SignatureBox(),
              Padding(
                padding: EdgeInsets.only(
                  left: 43.rpx,
                  right: 20.rpx,
                  bottom: 17.rpx,
                ),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '积分任务',
                      style: TextStyle(
                        fontSize: 24.rpx,
                        color: const Color(0xff333333),
                      ),
                    ),
                    InkWell(
                      child: Row(
                        children: [
                          Text(
                            '查看更多',
                            style: TextStyle(
                              fontSize: 16.rpx,
                              color: const Color(0xff999999),
                            ),
                          ),
                          Image.asset(
                            'assets/images/gright.png',
                            height: 20.rpx,
                          ),
                        ],
                      ),
                    ),
                  ],
                ),
              ),
              const SignatureNav(),
              const ProductBox(
                children: [
                  ProductItem(
                    img: '1',
                    name: '特色松花蛋6个',
                    pint: '1200',
                  ),
                  ProductItem(
                    img: '2',
                    name: '陕西绿心猕猴一箱',
                    pint: '2000',
                  ),
                ],
              ),
              const ProductBox(
                children: [
                  ProductItem(
                    img: '3',
                    name: '精美咖啡杯',
                    pint: '4000',
                  ),
                  ProductItem(
                    img: '4',
                    name: '家具抱枕',
                    pint: '6000',
                  ),
                ],
              ),
            ],
          ),
        ],
      ),
    );
  }
}
